<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>axios</title>
</head>

<body>
    <div id="app">
        <table border="1">
            <tr v-for="hospset in list">
                <td>{{hospset.hosname}}</td>
                <td>{{hospset.hoscode}}</td>
            </tr>
        </table>
    </div>
    <script src="/vue.min.js"></script>
    <script src="/axios.min.js"></script>
    <script>
        new Vue({
            el: '#app',
            data: {
                list:[]//数组
            },
            created(){
                this.getList()
            },
            methods:{
                getList(id){
                    axios.get('http://localhost:8201/admin/hosp/hospitalSet/findAll').then(response => {
                        console.log(response)
                        this.list = response.data.data.list
                    }).catch(error => {
                        console.log(error)
                    })
                }
            }
        })
    </script>
</body>

</html>